using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.Persistent.Base;
using DevExpress.ExpressApp.Win.Editors;
using DevExpress.XtraGrid.Columns;
using Ascent.QiPei.Module.Win.Sales;

namespace Ascent.QiPei.Module.Win.Controllers
{
    public partial class ViewController1 : ViewController
    {
        public ViewController1()
        {
            InitializeComponent();
            RegisterActions(components);
        }

        private void ViewController1_ViewControlsCreated(object sender, EventArgs e)
        {
            //GridListEditor listEditor = ((ListView)View).Editor as GridListEditor;
            //listEditor.FocusedObjectChanged += listEditor_FocusedObjectChanged;
            
            //if (listEditor != null)
            //{
            //    foreach (GridColumn column in listEditor.GridView.Columns)
            //    {
            //        column.ToolTip = "Click to sort by " + column.Caption;
            //    }
            //}

        }

        void listEditor_FocusedObjectChanged(object sender, EventArgs e)
        {
            
        }

        private void simpleAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            SaleOrderForm form1 = new SaleOrderForm(ObjectSpace);

            //form1.ObjectSpace = ObjectSpace;
            form1.ShowDialog();
        }
    }
}
